Document! X & HelpStudio Bundle 2022.1
Configure Build Profile and Build Flags / Building with MSBUILD
In This Topic
    Building with MSBUILD
    In This Topic

    Document! X and HelpStudio Bundle includes a custom MSBUILD task which can be used to integrate the build of documentation with your MSBUILD-based build process.

    MSBUILD Task Assembly Location

    The Document! X & HelpStudio Bundle 2022.1 MSBUILD Task assembly file is named Innovasys.DocumentX.Build.dll and can be found in a \bin sub-directory below the Document! X and HelpStudio Bundle installation path. The default bin path is c:\Program Files\Innovasys\DocumentX2022\bin\.

    The MSBUILD Task Assembly requires other Document! X and HelpStudio Bundle assemblies and should not be moved from the installation path.

    Builds executed using the MSBUILD task require a full installation of Document! X and HelpStudio Bundle. If you are integrating with a build on a build server, you must install a licensed copy of Document! X and HelpStudio Bundle on the build server.

    Integrating the Custom MSBUILD Task

    To integrate the build of a Document! X and HelpStudio Bundle project with your MSBUILD process, follow these steps:

    1. Open your MSBUILD project file (e.g. .proj, .vbproj, .csproj file) in Notepad.
      The project file is actually an MSBUILD XML file that you will edit to add Document! X and HelpStudio Bundle to the build tasks. For more information on MSBUILD, see the MSBUILD documentation on MSDN.
    2. Add references to the MSBUILD task assembly in the file, as below:
      <Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
        <PropertyGroup>
          ...
        </PropertyGroup>
        ...
        <ItemGroup>
          ...
        </ItemGroup>
        <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
        <UsingTask AssemblyFile="[BinPath]\Innovasys.DocumentX.Build.dll" TaskName="ProjectBuildTask" />
        <Target Name="GenerateDocumentation" Condition=" '$(Configuration)' == 'Release' ">
          <Innovasys.DocumentX.Build.ProjectBuildTask ProjectFileName="documentation\documentation.dxp"/>
        </Target>
      </Project>
    3. Replace [BinPath] in the sample above with the location of the assembly containing the MSBUILD task, outlined in the "MSBUILD Task Assembly Location" section earlier in this topic.
    4. Replace the ProjectFileName attribute value in the sample above with the location of your Document! X & HelpStudio Bundle 2022.1 project file - either a full path and filename or a path relative to the MSBUILD project file.
    5. If required, you can also specify a BuildConfigurationName attribute to identify a specific saved Build Configuration to build. If no BuildConfigurationName is specified, the first Build Profile is built. Example of Task XML specifying a Build Configuration:
       
      <Innovasys.DocumentX.Build.ProjectBuildTask
                      ProjectFileName="documentation\documentation.dxp"
                      BuildConfigurationName="MyBuildConfigurationName"/>
    See Also